﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.OleDb;
using System.Data;

public partial class dodadi : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void ButtonDodajGrad_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            AccessDataSource1.InsertCommand = "INSERT INTO Gradovi ( [IdGrad], [ImeGrad], [TaksaGrad] ) VALUES ( @valueIdGrad, @valueImeGrad, @valueTaksaGrad)";

            AccessDataSource1.InsertParameters.Add("@valueIdGrad", TextBoxIdGrad.Text);
            AccessDataSource1.InsertParameters.Add("@valueImeGrad", TextBoxImeGrad.Text);
            AccessDataSource1.InsertParameters.Add("@valueTaksaGrad", TextBoxTaksaGrad.Text);

            AccessDataSource1.Insert();
            Response.Redirect("MeniAdmin.aspx");
        }
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("MeniAdmin.aspx");
    }
}